﻿/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 2016/4/21
 * Time: 11:11
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

namespace SharpChannel.Util
{
	/// <summary>
	/// Description of SharpSingleton.
	/// </summary>
	public class SharpSingleton <T> where T:class, new()
	{
		
		private static T ____instance;
		
		public static T GetInstance()
		{
		    return ____instance ?? (____instance = new T());
		}

	    public static T Instance(){
			return GetInstance();
		}
		
		
	}
}
